<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<script type="text/javascript">
function registrationCheck(id){
	//alert(id);
	if(confirm(id + " 회원을 관리자로 등록하시겠습니까?")){
		location.href = "adminRegistration.action?id="+ id;
		//alert("adminRegistration.action?id="+ id );
	}; 
}
</script>
<h2 class="page_title"><strong>관리자 추가하기</strong></h2>
<form>
<fieldset>
<legend>관리자 추가</legend>
	<p class="mar_b_20">관리자로 등록할 회원을 조회해주세요. </p>
	<p><strong>ID</strong> : <input type="text" maxlength="16" name="id" /> <input type="submit" value="search" /></p>
</fieldset>
</form>

<s:if test="resultClass != null">
<h3 class="page_title"><strong>회원 정보</strong></h3>
<table class="table_view">
	<colgroup>
		<col width="200px"/>
		<col />
	</colgroup>
	<tr>
		<th>no</th>
		<td><s:property value="resultClass.no"/></td>
	</tr>
	 <tr>
	 	<th>id</th>
	 	<td><s:property value="id"/></td>
	 </tr>
	 <tr>
	 	<th>name</th>
	 	<td><s:property value="resultClass.name"/></td>
	 </tr>
	 <tr>
	 	<th>age</th>
	 	<td><s:property value="resultClass.age"/></td>
	 </tr>
	 <tr>
	 	<th>gender</th>
	 	<td><s:property value="resultClass.gender"/></td>
	 </tr>
	 <tr>
	 	<th>nickname</th>
	 	<td><s:property value="resultClass.nickname"/></td>
	 </tr>
	 <tr>
	 	<th>email</th>
	 	<td><s:property value="resultClass.email"/></td>
	 </tr>
	 <tr>
	 	<th>phone</th>
	 	<td><s:property value="resultClass.phone1"/>-<s:property value="resultClass.phone2"/>-<s:property value="resultClass.phone3"/></td>
	 </tr>
</table>
<p class="align_r">
	<s:if test="resultClass.isadmin > 0"><font color="red"><strong>관리자 입니다.</strong></font></s:if>
	<s:else>
	<a href="javascript:registrationCheck('<s:property value="id"/>');"><font color="red"><strong>Administrator Registration [관리자 등록]</strong></font></a>
	</s:else>
</p>
</s:if>





